feat: add stats/incr/nanprod#6026
Merged
Merged
Conversation
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
Member
|
/stdlib merge |
Planeshifter
previously requested changes
Jan 16, 2026
| * | ||
| * ## Notes | ||
| * | ||
| * - If provided `NaN` or a value which, when used in computations, results in `NaN`, the accumulated value is `NaN` for all future invocations. |
Member
There was a problem hiding this comment.
This note was copied from prod but is incorrect for nanprod. The whole purpose of this package is to ignore NaN values, not propagate them. The tests at lines 220-222 and 246-248 explicitly verify this behavior (e.g., 'ignores NaN and retains +infinity').
Suggested change
| * - If provided `NaN` or a value which, when used in computations, results in `NaN`, the accumulated value is `NaN` for all future invocations. | |
| * - If provided `NaN`, the value is ignored and the accumulated product remains unchanged. |
Requested changes applied in the maintainer cleanup commit: removed the incorrect NaN note in index.d.ts and added the missing '// MAIN //' section header. Dismissing the stale review.
- Add the missing '// MAIN //' section header (lint requires it) and drop the Method/References JSDoc blocks copied from incr/prod, since this package delegates - Remove the incorrect NaN-propagation note from index.d.ts (it ignores NaN) - Drop backticks from package.json description and tidy README wording - Fix examples output to use %s and guard against a null accumulated value - Bump copyright year to 2026
Contributor
PR Commit MessagePlease review the above commit message and make any necessary adjustments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #5619
Description
This pull request:
Related Issues
This pull request:
stats/incr/nanprod#5619Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers